import request from '@/utils/request'

/**
 * 获取验证码
 */
export const getCaptchaAPI = (key) => {
  return request({
    method: 'get',
    url: '/manager/captcha',
    params: {
      key
    },
    responseType: 'blob'
  })
}

/**
 * 登录
 */
export const loginAPI = (loginForm) => {
  return request({
    method: 'post',
    url: '/manager/login',
    data: loginForm
  })
}

/**
 * 获取用户菜单
 */
export const getMenuListAPI = () => {
  return request({
    method: 'get',
    url: '/manager/menus'
  })
}
